﻿using CommonLib.Pattern.Pool;
using System;
using UnityEngine;
//[RequireComponent(typeof(Collider2D))]
public class EffectItemBase : MonoBehaviour
{
	public bool IsPositive = true;
	public Action<EffectItemBase> EndAction;

	virtual protected void OnCollisionEnter2D(Collision2D collision)
	{
		if(collision.gameObject.tag == "Player")
		{
			EffectWithPlayer(collision.gameObject.GetComponent<RoleCtrl>());
			EndAction?.Invoke(this);
		}
	}

	virtual protected void EffectWithPlayer(RoleCtrl ctrl)
	{
		
	}
}
